home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK2.toast / Development Kits (Disc 2) / ScriptX / Code Samples / autofind / source / axisprop.sx < prev    next >
Encoding:
Text File  |  1996-05-21  |  1.6 KB  |  58 lines  |  [TEXT/ttxt]

  1. --<<<
  2. -- Filename: 
  3. --     axisprop.sx
  4.  
  5. -- Other Files Required:
  6. --     None
  7.  
  8. -- Specialized Classes:  
  9. --     AxisProperty
  10.  
  11. -- Instructions to User: 
  12. --     The AxisProperty class defines the attributes/properties that the grapher
  13. --     will graph the objects by. For each attribute you want the graph to represent
  14. --     you must instantiate an axis property.
  15.  
  16. -- Author:
  17. --     Dionn Stewart.  Revised by Ray Davis.
  18.  
  19. -- The AxisProperty class defines the attributes/properties that the grapher
  20. -- will graph the objects by.
  21. -- For each attribute you want the graph to represent you must instantiate
  22. -- a graph property.
  23.  
  24. in module Autofinder
  25.  
  26. class AxisProperty ()
  27. instance variables
  28.     axisTarget    -- target to be presented by the axis label
  29.     minValue    -- minimum value of the property
  30.     minTarget    --  target to be presented by the minimum label
  31.     maxValue    -- minimum value of the property
  32.     maxTarget    --  target to be presented by the maximum label
  33.     units        -- units of measurement that values are expressed in
  34.     name        -- case-sensitive name of the property (i.e., @price)
  35.     getterFn    -- getter generic to retrieve the property value
  36. end
  37.  
  38. method init self {class AxisProperty} #rest args #key \
  39.     axisTarget: minValue: minTarget:(undefined) \
  40.     maxValue: maxTarget:(undefined) units:("") name: ->
  41. (
  42.     self.axisTarget:= axisTarget
  43.     self.minValue:= minValue
  44.     if minTarget = undefined do
  45.         minTarget := minValue as String
  46.     self.minTarget:= minTarget
  47.     self.maxValue:= maxValue
  48.     if maxTarget = undefined do
  49.         maxTarget := maxValue as String
  50.     self.maxTarget:= maxTarget
  51.     self.units:= units
  52.     self.name:= name
  53.     self
  54. )
  55.  
  56. "Compiled axisprop.sx"
  57. -->>>
  58.